//验证
	function checkStaffNum(){
		var $staffNum=$("input[name=staffNum]");
		var reg=/^[a-zA-Z0-9]{4,16}$/;
		if($.trim($staffNum.val())==""){
			$staffNum.next().next().text("账号不能为空！");
			return false;
		}else if(!reg.test($staffNum.val())){
			$staffNum.next().next().text("账号只能是字母或数字6-16位！！");
			return false;
		}else {
			$staffNum.next().next().text("");
			return true;
		}
	}
	
	function checkPwd(){
		var $pwd=$("input[name=pwd]");
		var reg=/^[a-zA-Z0-9]{4,16}$/;
		var pwd=$pwd.val();
		if($.trim(pwd)==""){
			$pwd.next().next().text("密码不能为空！");
			return false;
		}else if(!reg.test(pwd)){
			$pwd.next().next().text("密码长度不能少于6-10位");
			return false;
		}else{
			$pwd.next().next().text("");
			return true;
		}
	}
	
	
	
	function checkForm(){
	    var flag=checkStaffNum();
	    flag=flag=checkPwd()&&flag;
	    return flag;
	  }
	
	$(function(){
	    $("input[name=staffNum]").blur(function(){
	    	if(checkStaffNum()){
	    		checkStaffNumAjax();
	    	}
	    });
	    $("input[name=staffNum]").focus(function(){
	    	$(this).next().next().text("");
	    });
	    $("input[name=pwd]").focus(function(){
	    	$(this).next().next().text("");
	    });
	    $("input[name=pwd]").blur(function(){
	    	checkPwd();
	    });
	    
	    $("form[name=myForm]").submit(function(){
	    	return checkForm();
	    });
	    
	    
	});